package cn.lopr.im.android.utils.jwt;

import io.jsonwebtoken.Claims;
import io.jsonwebtoken.Jwts;

public class ParseJwtTest {
    public static void main(String[] args) {
        String token = "eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiI4ODgiLCJzdWIiOiLlpKfnmb0iLCJpYXQiOjE2MTY4MzYxNDB9.cVzjAlH-69u7lc4SeE2-O2WyHeoUqiw-mbAsMYZxBlg";
        Claims claims = Jwts.parser().setSigningKey("cn.lopr").parseClaimsJws(token).getBody();
        System.out.println("id:" + claims.getId());
        System.out.println("subject:" + claims.getSubject());
        System.out.println("IssuedAt:" + claims.getIssuedAt());
    }
}